package com.live.http.client.study;

import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;

public class UrlExecution {

	public static void main(String[] args) throws Exception{
		urlConnection();
	}
	
	
	public static void urlConnection() throws Exception{
		String spec="http://mu.e.labi.com";
		
		URL url=new URL(spec);
		URLConnection connection=url.openConnection();
		InputStream stream=connection.getInputStream();
		
		int len;
		byte[] tmp = new byte[2048];
		while ((len = stream.read(tmp)) != -1) {
			System.out.println(new String(tmp, 0, len,"utf-8"));
		}
		
	}
	
}
